'''
Created on 21.7.2011

@author: gilead
'''
from direct.showbase import DirectObject

from protocol import *

class WorldListener(DirectObject.DirectObject):
    '''
    classdocs
    '''
    def __init__(self, world, viseffects):
        '''
        Constructor
        '''
        self.accept(CREATE_SHIP_MSG, world.CreateShip)
        self.accept(MOVE_SHIP_MSG, world.MoveShip)
        self.accept(INFORM_USER_ID_MESSAGE, world.setUserID)
        
        self.accept(FIRE_TURRET_MESSAGE, viseffects.fireLaser)